package com.junzhiit.nengji.app.web.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.junzhiit.nengji.app.service.SystemTypeService;
import com.junzhiit.nengji.app.web.vo.ResultVO;

import io.swagger.annotations.ApiOperation;

@RestController
@RequestMapping("/system/type")
public class SystemTypeController extends BaseController {
	
	@Autowired
	private SystemTypeService systemService;
	
	@ApiOperation(value = "查询所有系统分类信息,未分类无子集")
	@RequestMapping(method = RequestMethod.GET)
	public ResultVO findAll() {
		return systemService.findAll();
	}
	
	@ApiOperation(value = "查询所有系统分类信息,分好类带子集")
	@RequestMapping(value = "/grading",method = RequestMethod.GET)
	public ResultVO findAllGrading() {
		return systemService.findAllGrading();
	}
	
	@ApiOperation(value = "查询所有分类信息的名称,未分类")
	@RequestMapping(value = "/name",method = RequestMethod.GET)
	public ResultVO findAllName() {
		return systemService.findAllName();
	}
	
	@ApiOperation(value = "查询所有系统分类信息的名称,分好类带子集")
	@RequestMapping(value = "/name/grading",method = RequestMethod.GET)
	public ResultVO findAllGradingName() {
		return systemService.findAllNameGrading();
	}

}
